package com.java.advance.ticket.controller;

import com.java.advance.ticket.service.ITicketService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yangminghua on 2019/4/16.
 */
@Slf4j
@RestController
@RequestMapping("/ticket")
public class TicketController {

    @Autowired
    private ITicketService ticketService;

    /**
     * 查询某一车次的余票信息
     *
     * @param ticketSeq
     * @return
     */
    @RequestMapping("queryTicketStock")
    public Object queryTicketStock(String ticketSeq) {
        //本质 多个线程查询调用查询余票的方法
        return ticketService.queryTicketStock(ticketSeq);
    }
}
